<div ng-controller="violatedContractListCtrl">
    <div class="table-header mt5 clearfix ng-scope">
        <span class="fl lh30 f14">违规合同</span>
    </div>
    <my-nav data-nav-items="filterDataCities" onchanged="changeCity" data-title="城市区域:" data-text-field="areaName"></my-nav>
    

    <div class="table-header mt20 clearfix ng-scope">
        <span class="fl lh30 f14">违规合同列表</span>
        <div class="fr btn-group">
            <input class="input-text fl ng-pristine ng-untouched ng-valid" style="width: 470px;" type="text" placeholder="客户名称/合同编号" ng-model="query.keyword" ng-enter="query.execute()"/>
            <a class="btn" href="javascript: void(0)"  ng-click="query.execute()">查询</a>
            <a href="javascript:;" class="btn"
                ui-dialog="新建违规合同"
                ui-dialog-data=""
                ui-dialog-init="onContractEditShow(null,$dialog,$dialogScope)"
                ui-dialog-ok="saveContract($dialog,$dialogScope)"
                ui-dialog-cache="false"
                ui-dialog-url="/abnormal/dialog/violated_contract_edit.html">新建违规合同</a>            
        </div>
    </div>

    <div id="grid" class="table-wrap mt10">
        <table width="100%">
            <thead>
            <tr>
                <th width="40">序号</th>
                <th width="200">合同编号</th>
                <th>违规信息</th>
                <th width="200">审批信息</th>
                <th width="200">变通方案</th>
                <th width="40">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="record in contracts">
                <td height="40"><p ng-bind="$index + 1 + startPageIndex"></p></td>
                <td class="lh14">
                    <p>{{record.contract_code}}</p>
                    <p style="color: gray">客户简称：{{record.customer_name}}</p>
                    <p style="color: gray">所属区域：{{record.area_name}}</p>
                </td>
                <td>
                    <p>违规责任人：{{record.principal_name}}</p>
                    <p>违规大类：{{record.category_name}}</p>
                    <p>违规小类：{{record.littler_category_name}}</p>
                </td>  
                <td>
                    <p>审批人：{{record.approver_name}}</p>
                    <p>审批意见：{{record.approve_comment}}</p>
                </td>
                <td><p ng-bind="record.alternative_solution"></p></td>                
                <td>
                    <a href="javascript:;"
                        ui-dialog="编辑违规合同"
                        ui-dialog-data="record"
                        ui-dialog-show="onContractEditShow(record,$dialog,$dialogScope)"
                        ui-dialog-ok="saveContract($dialog,$dialogScope)"
                        ui-dialog-cache="false"
                        ui-dialog-url="/abnormal/dialog/violated_contract_edit.html">编辑</a>     
                </td>
            </tr>
            </tbody>
        </table>
        <div class="no-data" style="display:none"><span>暂无数据</span></div>
    </div>
    <div id="pagination" class="pagination"></div>
</div>
